const Mock = require('mockjs')

const data = Mock.mock({
  'items|30': [{
    id: '@id',
    channel_id: '@integer(72, 100)',
    server_id: '@integer(5001, 6000)',
    account_name: '@integer(53500, 63500)',
    actor_id: '@integer(5001, 23500)',
    actor_name: '@sentence(3, 4)',
    realname: '@cname',
    operator: '@cname',
    'status|1': ['published', 'draft', 'deleted'],
    logdate: '@datetime',
  }]
})

module.exports = [
  {
    url: '/lw/actors/a',
    type: 'get',
    response: config => {
      const items = data.items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
